package com.first.order.controller;


import com.first.common.pojo.EduVideo;
import com.first.common.vo.Result;
import com.first.order.service.QianEduVideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: SecondProject
 * @description:
 * @author: 李榕轩
 * @create: 2023-05-27 16:10
 **/
@RestController
@RequestMapping("order/video")
@Api(tags = "课程接口类")
public class QianEduVideoController {
    /*
    * queryAllCourse*/
    @Autowired
    private QianEduVideoService qianEduVideoService;
    @PostMapping("/queryAllVideoByCourseId/{id}")
    @ApiOperation(value = "条件查询")
    public Result queryAllVideoByCourseId(@PathVariable String id) {
        //System.out.println(userVo);
        List<EduVideo> eduVideos = qianEduVideoService.queryAllVideoByCourseId(id);

        return Result.success(eduVideos);

    }
}
